
const webpack = require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const path = require('path')
const OpenBrowserWebpackPlugin = require('open-browser-webpack-plugin')

module.exports = {
    entry: {
        app: './src/index.js'
    },
    module: {
        loaders: [{
            test: /\.js$/,
            exclude: /node_modules/,
            include: [
                path.resolve(__dirname, 'src')
            ],
            loader: 'babel-loader'
        }]
    },
    plugins: [
        new HtmlWebpackPlugin({
            template: './src/index.html',
            filename: 'index.html',
            chunks: ['app'],
            inject: 'body'
        }),
        new OpenBrowserWebpackPlugin({
            url: 'http://0.0.0.0:8081'
        })
    ],
    output: {
        filename: 'bundle.js'
    },
    resolve: {
        alias: {

        },
        extensions: ['.js']
    },
    devServer: {
        disableHostCheck: true
    }
};